<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<?php
$this->addCssFile('/project/apps/ecga/styles/style.css');
$this->addCssFile('/project/apps/ecga/styles/form.css');

$this->addScriptFile('/statics/js/mootools/core.js');
$this->addScriptFile('/statics/js/mootools/more.js');
?>
<body>
    <?php $this->import('tips'); ?>

    <div class="action-header">
        <h3><?php  $this->put('管理员修改');?></h3>
        <p class="action-desc"><?php $this->put('您可以在这里修改管理员的信息，或者点击这里返回'); ?><?php $this->txtLink('管理员列表', './master.php?a=show'); ?>。</p>
    </div>


    <form id="theForm" action="./master.php?a=doEdit" method="post" enctype="multipart/form-data">
        <div class="box">
            <div class="head">
                <p><?php $this->put('基本信息'); ?></p>
            </div>
            <div class="body">
                <dl class="formrow">
                    <dt>
                        <?php $this->put('管理员姓名:');?>
                    </dt>
                    <dd>
                        <input type="hidden" name="formHash" value="<?php $this->put($formHash);?>" />
                        <input type="hidden" name="id" value="<?php $this->put($id);?>" />
                        <input type="text" readonly="readonly"  value="<?php $this->put($data->userName);?>" class="text" />
                        <div class="field-hints">管理员姓名，不可修改。</div>
                    </dd>
                </dl>
                <dl class="formrow">
                    <dt>
                        <?php $this->put('邮箱地址:'); ?>
                    </dt>
                    <dd>
                        <input type="text" readonly="readonly" name="userEmail" value="<?php $this->put($data->userEmail);?>" class="text" />
                        <div class="field-hints">邮箱地址，不可修改。</div>
                    </dd>
                </dl>

                <dl class="formrow">
                    <dt>
                        <?php $this->put('管理员分组:');?>
                    </dt>
                    <dd>
                        <select name="groupId"  class="required valide-one-selected msgPos:'usergroupAdvice'">
                            <option value="">请选择</option>
                            <?php $this->htmlOptions($userGroupOptions, $data->groupId)?>
                        </select>
                        <div class="hint" id="usergroupAdvice"></div>
                    </dd>
                </dl>
            </div>
        </div>
        <div class="buttonrow">
            <input type="submit" class="submit" value="<?php $this->put('保存管理员信息'); ?>"/>
        </div>
    </form>
    <?php $this->import('footer'); ?>
</body>

<script type="text/javascript">
window.addEvent('domready', function() {
    myFormValidator = new Form.Validator.Inline('theForm', {
        evaluateFieldsOnChange: false
    });
});
</script>
</html>